<%--
  Created by IntelliJ IDEA.
  User: win
  Date: 2020/10/14
  Time: 22:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>out内置对象的使用</title>
</head>
<body>
<%
    out.println("<h1>");
    out.println("hello world");
    out.println("</h1>");
    int bufferSize = out.getBufferSize();
    System.out.println("获取到的缓冲器大小为："+bufferSize);
    int remaining = out.getRemaining();
    System.out.println("缓冲器的剩余字节数为："+remaining);
    System.out.println("已经使用的字节数为："+(bufferSize-remaining));
    out.clear();//清除缓冲区 数据不会输出
    remaining = out.getRemaining();
    System.out.println("缓冲器的剩余字节数为："+remaining);
    out.close();
%>
</body>
</html>
